package com.ocean.entity.edu;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;


/**
 * @author greenbird
 * @create 2023-03-04 15:21
 */
@Data
@ColumnWidth(25)
@NoArgsConstructor
public class Student {
    @ExcelIgnore//忽略这个字段
    private Integer id;
    @ExcelProperty("姓名")
    private String sname;
    @ExcelProperty("性别")
    private String sex;
    @DateTimeFormat(value = "yyyy-MM-dd")
    @ExcelProperty("出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date birthday;
    @ExcelProperty("班级ID")
    private Integer classid;
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date ctime;


    public Student(String sname, String sex, Date birthday, Integer classid) {
        this.sname = sname;
        this.sex = sex;
        this.birthday = birthday;
        this.classid = classid;
    }
}
